package com.biao.cloud.service;

import com.biao.cloud.entities.Payment;
import com.biao.cloud.entities.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")   // 是注册中心的服务名
public interface PaymentFeignService {
    // 这就很想controller层的接口调用,调用到了注册中心的服务
    @GetMapping("/payment/get/{id}")
    public Result<Payment> getPaymentById(@PathVariable("id") Long id);
}
